package com.skivingcloud.admin.sys.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 系统用户
 * </p>
 *
 * @author skivingcloud
 * @since 2022-01-28
 */
@TableName("sys_user")
@ApiModel(value = "User对象", description = "系统用户")
@JsonIgnoreProperties(ignoreUnknown = true)
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    private String id;

    @ApiModelProperty("用户名")
    private String username;

    @ApiModelProperty("密码")
    private String password;

    @ApiModelProperty("盐")
    private String salt;

    @ApiModelProperty("邮箱")
    private String email;

    @ApiModelProperty("手机号")
    private String mobile;

    @ApiModelProperty("用户状态：100201-正常、100202-锁定、100203-停用、100204-删除")
    private String status;

    @ApiModelProperty("创建者")
    private String createUserId;

    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty("员工编号")
    private String staffId;

    @ApiModelProperty("ERP企业编号")
    private String enterpriseId;

    @ApiModelProperty("ERP企业名称")
    private String enterpriseName;

    @ApiModelProperty("姓名")
    private String staffName;

    @ApiModelProperty("证件类型 01-居民身份证、02-居民户口薄、03-驾驶证、04-军官证、05-士兵证、06-军官离退休证、07-中国护照、08-异常身份证、09-港澳台通行证、10-台湾通行证、11-回乡证、51-外国护照、52-旅行证、53-居留证件、71-组织机构代码证、72-税务登记证、73-营业执照、99-其他证件")
    private String idType;

    @ApiModelProperty("证件号码")
    private String idNo;

    @ApiModelProperty("最后修改人")
    private String lastChangeder;

    @ApiModelProperty("最后修改时间")
    private LocalDateTime lastChnagedTime;

    @ApiModelProperty("最后修改密码时间")
    private LocalDateTime lastChangedPwdTime;

    @ApiModelProperty("登录错误次数")
    private BigDecimal errorTime;

    @ApiModelProperty("登录状态(0-未登录 1-已登录)")
    private String loginStatus;

    @ApiModelProperty("提醒修改密码周期(单位：天)")
    private BigDecimal alterTime;

    @ApiModelProperty("最后登录时间")
    private LocalDateTime loginTime;

    @ApiModelProperty("排序")
    private BigDecimal ordernum;

    @ApiModelProperty("审核状态")
    private String chkStatus;

    @ApiModelProperty("组织机构")
    private String orgId;

    @ApiModelProperty("当前皮肤")
    private String skin;

    @ApiModelProperty("对接外部系统识别账号")
    private String accountName;

    @ApiModelProperty("上次登录终端：1-PC、2-APP")
    private String loginTerminal;

    @ApiModelProperty("租户")
    private String tenantId;

    @TableField(exist = false)  
    private String orgName;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }
    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }
    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }
    public String getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(String createUserId) {
        this.createUserId = createUserId;
    }
    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }
    public String getStaffId() {
        return staffId;
    }

    public void setStaffId(String staffId) {
        this.staffId = staffId;
    }
    public String getEnterpriseId() {
        return enterpriseId;
    }

    public void setEnterpriseId(String enterpriseId) {
        this.enterpriseId = enterpriseId;
    }
    public String getEnterpriseName() {
        return enterpriseName;
    }

    public void setEnterpriseName(String enterpriseName) {
        this.enterpriseName = enterpriseName;
    }
    public String getStaffName() {
        return staffName;
    }

    public void setStaffName(String staffName) {
        this.staffName = staffName;
    }
    public String getIdType() {
        return idType;
    }

    public void setIdType(String idType) {
        this.idType = idType;
    }
    public String getIdNo() {
        return idNo;
    }

    public void setIdNo(String idNo) {
        this.idNo = idNo;
    }
    public String getLastChangeder() {
        return lastChangeder;
    }

    public void setLastChangeder(String lastChangeder) {
        this.lastChangeder = lastChangeder;
    }
    public LocalDateTime getLastChnagedTime() {
        return lastChnagedTime;
    }

    public void setLastChnagedTime(LocalDateTime lastChnagedTime) {
        this.lastChnagedTime = lastChnagedTime;
    }
    public LocalDateTime getLastChangedPwdTime() {
        return lastChangedPwdTime;
    }

    public void setLastChangedPwdTime(LocalDateTime lastChangedPwdTime) {
        this.lastChangedPwdTime = lastChangedPwdTime;
    }
    public BigDecimal getErrorTime() {
        return errorTime;
    }

    public void setErrorTime(BigDecimal errorTime) {
        this.errorTime = errorTime;
    }
    public String getLoginStatus() {
        return loginStatus;
    }

    public void setLoginStatus(String loginStatus) {
        this.loginStatus = loginStatus;
    }
    public BigDecimal getAlterTime() {
        return alterTime;
    }

    public void setAlterTime(BigDecimal alterTime) {
        this.alterTime = alterTime;
    }
    public LocalDateTime getLoginTime() {
        return loginTime;
    }

    public void setLoginTime(LocalDateTime loginTime) {
        this.loginTime = loginTime;
    }
    public BigDecimal getOrdernum() {
        return ordernum;
    }

    public void setOrdernum(BigDecimal ordernum) {
        this.ordernum = ordernum;
    }
    public String getChkStatus() {
        return chkStatus;
    }

    public void setChkStatus(String chkStatus) {
        this.chkStatus = chkStatus;
    }
    public String getOrgId() {
        return orgId;
    }

    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }
    public String getSkin() {
        return skin;
    }

    public void setSkin(String skin) {
        this.skin = skin;
    }
    public String getAccountName() {
        return accountName;
    }

    public void setAccountName(String accountName) {
        this.accountName = accountName;
    }
    public String getLoginTerminal() {
        return loginTerminal;
    }

    public void setLoginTerminal(String loginTerminal) {
        this.loginTerminal = loginTerminal;
    }
    public String getTenantId() {
        return tenantId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    /**
     * @return String return the orgName
     */
    public String getOrgName() {
        return orgName;
    }

    /**
     * @param orgName the orgName to set
     */
    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }
    
    @Override
    public String toString() {
        return "User{" +
            "id=" + id +
            ", username=" + username +
            ", password=" + password +
            ", salt=" + salt +
            ", email=" + email +
            ", mobile=" + mobile +
            ", status=" + status +
            ", createUserId=" + createUserId +
            ", createTime=" + createTime +
            ", staffId=" + staffId +
            ", enterpriseId=" + enterpriseId +
            ", enterpriseName=" + enterpriseName +
            ", staffName=" + staffName +
            ", idType=" + idType +
            ", idNo=" + idNo +
            ", lastChangeder=" + lastChangeder +
            ", lastChnagedTime=" + lastChnagedTime +
            ", lastChangedPwdTime=" + lastChangedPwdTime +
            ", errorTime=" + errorTime +
            ", loginStatus=" + loginStatus +
            ", alterTime=" + alterTime +
            ", loginTime=" + loginTime +
            ", ordernum=" + ordernum +
            ", chkStatus=" + chkStatus +
            ", orgId=" + orgId +
            ", skin=" + skin +
            ", accountName=" + accountName +
            ", loginTerminal=" + loginTerminal +
            ", tenantId=" + tenantId +
        "}";
    }

}
